#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QProcess>
#include <QPushButton>
#include <QPlainTextEdit>
#include <QLineEdit>
#include <QColor>

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow() = default;

private:
    void showMessage(QString msg, QColor color = nullptr);
private slots:
    void clicked();
    void errorOccurred(QProcess::ProcessError error);
    void finished(int exitCode, QProcess::ExitStatus exitStatus);
    void readyReadStandardError();
    void readyReadStandardOutput();
    void started();
    void stateChanged(QProcess::ProcessState newState);

private:
    QProcess *process;
    QLineEdit *lineEdit;
    QPushButton *btn;
    QPlainTextEdit *plainLineEdit;
};
#endif // MAINWINDOW_H
